package com.njwb.day03;

import java.util.Arrays;

public class c {
    public static void main(String[] args) {
        int[] arr = {1, 2, 3, 4, 5};
        int k = 10;
        int[] newArr = new int[arr.length -1];
        for(int i=0;i<arr.length;i++){
          if(i<2){
              newArr[i]=arr[i];
          }if (i>2)
        { newArr[i-1]=arr[i];}

        }

        arr=newArr;
        System.out.println(arr.length);
        System.out.println(Arrays.toString(arr));
    }
}
